/**
 *
 * @author 朱雀
 */
Ext.define('SvgEditor.module.EditorPanel', {
	extend: 'Ext.panel.Panel',
	layout: 'border',
	readOnly: false,
	initComponent: function() {
		var me = this;
		me.initCanvas(me);
		me.initModelTree(me);
		me.initTbar(me);
		me.items = [me.modelTree, me.canvas];
		me.callParent();
	},
	initCanvas: function(me) {
		me.canvas = Ext.create('SvgEditor.module.CanvasPanel', {
			region: 'center',
			readOnly: me.readOnly
		});
	},
	initModelTree: function(me) {
		me.modelTree = Ext.create('SvgEditor.module.ModelTree', {
			region: 'west',
			width: 200
		});
	},
	initTbar: function(me) {
		me.tbar = me.topBar = Ext.create('SvgEditor.module.TopToolbar', {canvas: me.canvas});
	}
});